package com.zhonghui.license;

import de.schlichtherle.license.LicenseParam;
import de.schlichtherle.license.LicenseManager;

public class LicenseManagerHolder
{
    private static volatile LicenseManager LICENSE_MANAGER;
    
    public static LicenseManager getInstance(final LicenseParam param) {

        if (LicenseManagerHolder.LICENSE_MANAGER == null) {
            synchronized (LicenseManagerHolder.class) {
                if (LicenseManagerHolder.LICENSE_MANAGER == null) {
                    LicenseManagerHolder.LICENSE_MANAGER = new CustomLicenseManager(param);
                }
            }
        }
        return LicenseManagerHolder.LICENSE_MANAGER;
    }
}
